
set(CMAKE_C_COMPILER   riscv64-unknown-linux-gnu-gcc)
set(CMAKE_ASM_COMPILER riscv64-unknown-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER riscv64-unknown-linux-gnu-gcc)

set(C_FLAGS "-march=rv64g   -fno-builtin -mcmodel=medany  -fvisibility=hidden")
set(C_FLAGS "${C_FLAGS} -static -nostartfiles")
set(C_FLAGS "${C_FLAGS} -O0 -Wall  -g -gdwarf-2")

set(CMAKE_C_FLAGS ${C_FLAGS})
set(CMAKE_CXX_FLAGS ${C_FLAGS})
set(CMAKE_ASM_FLAGS ${C_FLAGS})